/**
  * @file     	led.h
  * @author   	YangHaifeng
  * @email   	2995339193@qq.com
  * @version	V0.0
  * @license  	GNU General Public License (GPL)  
  * @detail		please follow the license!!!
  * @attention
  *  this file is aim to do something with led									
  *   																	
  * @htmlonly 
  * <span style="font-weight: bold">History</span> 
  * @endhtmlonly 
  * Version|Auther|Describe
  * ------|----|-------- 
  * V0.0|YangHaifeng|Create File
  * <h2><center>&copy;COPYRIGHT YangHaifeng All Rights Reserved.</center></h2>
  */ 
  
#ifndef __LED_H 
#define __LED_H

#include "driverlib.h"
#include <stdint.h>
#include <stdbool.h>

/*switch the color of led*/
//#define LED_1
//#define LED_R
//#define LED_G
#define LED_B

#if defined(LED_1)
#define led_on()	GPIO_setOutputHighOnPin(GPIO_PORT_P1,GPIO_PIN0)
#define led_off()	GPIO_setOutputLowOnPin(GPIO_PORT_P1,GPIO_PIN0)
#elif defined(LED_R)
#define led_on()	GPIO_setOutputHighOnPin(GPIO_PORT_P2,GPIO_PIN0)
#define led_off()	GPIO_setOutputLowOnPin(GPIO_PORT_P2,GPIO_PIN0)
#elif defined(LED_G)
#define led_on()	GPIO_setOutputHighOnPin(GPIO_PORT_P2,GPIO_PIN1)
#define led_off()	GPIO_setOutputLowOnPin(GPIO_PORT_P2,GPIO_PIN1)
#elif defined(LED_B)
#define led_on()	GPIO_setOutputHighOnPin(GPIO_PORT_P2,GPIO_PIN2)
#define led_off()	GPIO_setOutputLowOnPin(GPIO_PORT_P2,GPIO_PIN2)
#endif

void led_init(void);

#endif //__LED_H



